<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

</body>
<script>
    function Person(){
        this.name = 'jack';
        this.age = 18;
    }

//    Person.prototype.method = function(){
//        console.log('我是一个函数');
//    }

    Person.prototype={
        constructor:Person,
        method:function(){}
    }

    Object.defineProperty(Person.prototype,'constructor',{
        enumerable:false
    })
    var p =new Person();
    //for in 循环不止会对对象本身进行遍历 也会遍历原型链上面可枚举的
    for(var key in p){
        console.log(key);
    }
</script>
</html>